<?php
/**
 * Zend Framework Contribution
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Mwb
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    1.0 Catalog.php 3 mai 2012 Sergio DE VASCONCELOS
 */

require_once('Zend/Mwb/Dom/Abstract.php');
require_once('Zend/Mwb/Dom/Schematas.php');

/**
 * MySQL Workbench document
 *
 * @category   Zend
 * @package    Zend_Mwb
 */
class Zend_Mwb_Dom_Catalog extends Zend_Mwb_Dom_Abstract
{
	/**
	 * @var Zend_Mwb_Dom_Schematas
	 */
	protected $schematas;
	/**
	 * return Zend_Mwb_Dom_Schematas
	 */
	public function getSchematas() {
		return $this->schematas;
	}

	public function parse() {
		$dom = $this->node;
		
		$xpath = new DOMXPath($dom->ownerDocument);
    	$element = $xpath->query("value[@key='schemata']", $dom)->item(0);
        if (isset($element)) {
        	// FIXME : unset($this->schematas) 
        	$this->schematas = new Zend_Mwb_Dom_Schematas($element, $this);
        }
	}
	public function create() {
	}
}
